<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
		+ request.getServerName() + ":" + request.getServerPort()
		+ path + "/";
%>
<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath %>">
		<meta charset="UTF-8">
		<title>出入库记录查询</title>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/style.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/list.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/jquery-ui.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/jquery.page.css" />
		
		<style>
			.label_input .contentText{display:inline-block;width:100px;text-align:right;} 
			.label_input input{width:180px;} select{width:180px;}
		</style>

	</head>
	<body>
		<!-- 蓝色背景区域 -->
		<div class="wrap">
			<!-- 白色可用区域 -->
			<div class="canuse">
				<!------ 位置 ------>
	            <p class="contentText local"><span>位置：出入库记录查询</span></p>
				
            	<!-- 搜索区 -->
	            <div class="search_area">
                    <h4 class="sel_title"><img src="<%=basePath %>img/list/brand1.png" /><span>出入库记录查询</span></h4>
                    <div class="select_area">
                        <div class="select_text clear">
                        	<div class="label_input">
	                            <label class="contentText">所属型号阶段：</label> 
								<input type="text" name="stage" id="">
                        	</div>
                        	<div class="label_input">
	                            <label class="contentText">图号：</label> 
								<input type="text" name="graphNumber" id="">
                        	</div>
							<div class="label_input">
	                            <label class="contentText">单机名称：</label> 
								<input type="text" name="materialName" id="">
                        	</div>
                        	<div class="label_input">
	                            <label class="contentText">单机代号：</label> 
								<input type="text" name="materialCode" id="">
                        	</div>
                        	<div class="label_input">
	                            <label class="contentText">批次号：</label> 
	                            <input type="text" name="batchNo" id="">
                        	</div>
							<div class="label_input">
	                            <label class="contentText">仓库：</label> 
								<input type="text" name="storeName" id="">
                        	</div>
							<div class="label_input">
	                            <label class="contentText">类型： </label> 
								<select id="myselect" onchange="func()">
									<option value="">-请选择-</option>
									<option value="1">入库</option>
									<option value="2">出库</option>
								</select>
								<input type="text" name="type" id="type" hidden>
                        	</div>
                        	<div class="label_input">
								<label class="contentText">开始日期：</label>
								<input type="text" name="startTime" id="dateControl" readonly="readonly" style="width:150px;"/>
							</div>
							<div class="label_input">
								<label class="contentText">结束日期：</label>
								<input type="text" name="endTime" id="dateControl1" readonly="readonly" style="width:150px;"/>
							</div>
                            <div class="floatRight">
	                            <!-- <button class="btn_search bgd_blue_search">查询</button> -->
	                            <button class="search bgd_blue_search">查询</button>
	                            <button class="btn_clear bgd_white_clear">重置</button>
                            </div>
                        </div>
                    </div>
	            </div>
	            
	            <!-- 列表区 -->
	            <div class="show_list">
                	<div class="title_operate">
                    	<h4 class="sel_title"><img src="<%=basePath %>img/list/brand1.png" /><span>出入库列表</span></h4>
                		
                	</div>
                	<div class="list_area">
                        <!-- 信息列表区 -->
                        <div class="info_area">
                            <table class="tablelist" border="1" cellspacing="0" cellpadding="0">
                                <tbody>
                                    <tr class="menuText list_head">
                                        <th class="">所属型号阶段</th>
                                        <th class="">图号</th>
                                        <th class="">单机名称</th>
                                        <th class="">单机代号</th>
                                        <th class="">批次号</th>
                                        <th class="">数量</th>
										<th class="">类型</th>
										<th class="">仓库</th>
										<th class="">时间</th>
                                    </tr>
                                </tbody>
                                <tbody class="tablelist" id="detailData">
                                </tbody>

                            </table>
                        </div>
	                    <!-- 页码区 -->
	                    <!-- <div class="page_area contentText clear" id="queryPage"></div> -->
	                    <div class="pager contentText clear" id="queryPage"></div>
                    </div>
                </div>
			</div>
			
			<!-- 版尾  -->
			<div class="ending">
				Copyright© 2019-2020 磐基技术有限公司
			</div>
			
			<!-- 导入Excel文件 -->
			<div class="mask hidden">
				<div class="fileDiv">
					<h4 class="fileTitle">
						导入文件
						<img onclick="backFile();" src="<%=basePath %>img/list/delete.png"/>
					</h4>
					<form action="" method="post" class="fileForm">
						<label>请选择Excel文件：</label>
						<input type="file" name="file" id="fileInput" value=""/>
						<br /><br /><br />
						<input type="submit" name="submit" id="subBtn" class="bgd_blue_two img_hand" value="提交" />
                        <a onclick="backFile();" class="bgd_white_two img_hand">返回</a> 
					</form>
				</div>
			</div>
			
		</div>
	</body>
	<script src="<%=basePath %>js/3rd/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="<%=basePath %>js/3rd/template-web.js" type="text/javascript"></script>
	<script src="<%=basePath %>js/common/common.js" type="text/javascript"></script>
	<script src="<%=basePath %>js/frame/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="<%=basePath %>js/3rd/jquery-ui.js" type="text/javascript"></script>
	<script src="<%=basePath %>js/3rd/jquery.page.js" type="text/javascript"></script>
	<script src="<%=basePath %>js/stockQuery/inoutStockRecordQuery.js" type="text/javascript"></script>
	<script type="text/javascript">
		var h = document.documentElement.clientHeight;
		$(".wrap").css("height", h);
		
		// 获取每行 td 的兄弟节点
		$("td").hover(   
			function () {      
				$(this).parent().children().addClass("td_hover");
			},    
			function () {      
				$(this).parent().children().removeClass("td_hover");   
			}
		);
		
		// 日期控件
		$(function(){
	        $("#dateControl").datepicker({
	        	dateFormat : 'yy-mm-dd',
	            monthNamesShort:["January","February","March","April","May","June", "July","August","September","October","November","December"],
	 		 	changeYear:true,
	 		 	changeMonth:true,
	 		 	showOn:"button",
	 		 	buttonImage:"<%=basePath%>img/button/calendar.png",
	 		 	buttonImageOnly:false
	        });
	     });
		$(function(){
	        $("#dateControl1").datepicker({
	        	dateFormat : 'yy-mm-dd',
	            monthNamesShort:["January","February","March","April","May","June", "July","August","September","October","November","December"],
	 		 	changeYear:true,
	 		 	changeMonth:true,
	 		 	showOn:"button",
	 		 	buttonImage:"<%=basePath%>img/button/calendar.png",
	 		 	buttonImageOnly:false
	        });
	     });
		
		// 模板
		$(".bgd_export").hover(
			function () {      
				$(".export").css("display","block");
			},    
			function () {      
				$(".export").css("display","none");
			}
			
		);
		
		// 返回列表
		function backFile(){
			$(".mask").css("display", "none");
		}
		
		function func(){
			//获取被选中的option标签
			var type = $('#myselect').val();
			$("#type").val(type);
		}
		
		//window.setInterval(function(){
		setInterval(function(){
			//push();
		},1000);
		
		function push(){
			$.ajax({
				url:'<%=basePath%>inOutStockRecordQuery/isRefreshedJsp',
				dataType:'json',
				async:true,
				cache:false,
				success:function(data){
					if(data > 0){
						location.reload(true);
					}
				}
			});
		}
	</script>
</html>
